// component/moneyHead/moneyHead.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    pageSize: {
      type: Number,
      value: 300
    },
    pageSizeIndex: {
      type: Number,
      value: 3
    },
    moneyTotal: {
      type: Number,
      value: 0
    },
    total: {
      type: Number,
      value: 0
    },
    title: {
      type: String,
      value: '合同变动总额'
    },
    admin: {
      type: String,
      value: '0'
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    columns: [
      {value: 0, name: 20},
      {value: 1, name: 50},
      {value: 2, name: 100},
      {value: 6, name: 300},
      {value: 3, name: 500},
      {value: 4, name: 1000},
      {value: 5, name: 5000},
    ]
  },

  /**
   * 组件的方法列表
   */
  methods: {
    searchShow() {
      this.triggerEvent('searchShow');
    },
    onSelectPageSize(e) {
      this.triggerEvent('onSelectPageSize', {
        index: e.detail.value,
        pageSize: this.data.columns[e.detail.value].name
      });
    },
    moreDelete() {
      this.triggerEvent('moreDelete');
    },
    reset() {
      this.triggerEvent('resetData');
    }
  }
})
